package longyiqun.killwife.controller;

import longyiqun.killwife.KillwifeProp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by longyiqun on 02/03/2017.
 */

@Controller
public class HelloController {

    @Autowired
    private KillwifeProp prop;

    @RequestMapping("/")
    public String index(ModelMap map) {
        map.addAttribute("title", prop.getTitle());
        //System.out.println(prop.getTitle());
        return "index";
    }
}
